﻿using System.Collections.Generic;

namespace Landpy.LogAnalyzer.Log
{
    internal class LogSweeper : ILogSweeper
    {
        #region ILogSweeper Members

        public List<LogRow> ClearRepeat(List<LogRow> logRows)
        {
            List<LogRow> noRepeatLogRows = null;
            if (logRows != null)
            {
                noRepeatLogRows = new List<LogRow>();
                foreach (LogRow logRow in logRows)
                {
                    if (noRepeatLogRows.ContainsLogRow(logRow))
                    {
                        // N/A.
                    }
                    else
                    {
                        noRepeatLogRows.Add(logRow);
                    }
                }
            }
            return noRepeatLogRows;
        }

        #endregion
    }
}